package com.csw;

import java.awt.*;

/**
 * @author A
 * @version 1.0
 * @description: TODO
 * @date 2022/11/18 1:07
 */
public class Object {
    //坐标
    int x;
    int y;
    //宽高
    int width;
    int height;
    //图片
    Image img;
    //是否可以移动
    Boolean isMove =false;
    //质量
    int m;
    //积分
    int score;
    //类型 1:金矿 2:石块
    int type;
    void paintSelf(Graphics g){
        g.drawImage(img, x, y, null);
    }

    public int getWidth() {
        return width;
    }

    public Rectangle getRec(){
        return new Rectangle(x, y, width, height);
    }
}
